package com.caifu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.caifu.mapper.SysUserRoleMapper;
import com.caifu.pojo.SysUserRole;
import com.caifu.service.SysUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 用户角色表 服务实现类
 * </p>
 *
 * @author tww
 * @since 2021-03-11
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {

    @Resource
    private SysUserRoleMapper userRoleMapper;

    @Override
    public int getUserRoleCount(int roldId) throws Exception {
        try {
            return userRoleMapper.getUserRoleCount(roldId);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
}
